package com.yntx.usercenter.authorization.converter;

import com.yntx.usercenter.authorization.dto.PermissionDTO;
import com.yntx.usercenter.authorization.dto.PermissionUpdateDTO;
import com.yntx.usercenter.authorization.po.Permission;
import com.yntx.usercenter.authorization.vo.PermissionVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 许可转换器
 *
 * @author jielihaofeng
 * @date 2023/05/08
 */
@Mapper
public interface PermissionConverter {

    PermissionConverter INSTANCE = Mappers.getMapper(PermissionConverter.class);

    List<PermissionVO> permission2PermissionVoList(List<Permission> roleList);

    Permission permissionDto2Permission(PermissionDTO req);

    PermissionVO permission2PermissionVo(Permission permission);

    Permission permissionUpdateDTO2Permission(PermissionUpdateDTO dto);

}
